-- GENERATED SPELL FOR [Aelmar the Vanquisher] --


function spell0_17913(pUnit, Event) --@Consecration,Self--
pUnit:FullCastSpellOnTarget(32773,pUnit)
pUnit:RegisterEvent('Sorts_17913', 8000, 1)
end

function spell1_17913(pUnit, Event) --@Judgement of Command,n/a--
pUnit:FullCastSpellOnTarget(32778,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17913', 604, 1)
end

function Sorts_17913(pUnit, Event)
local choix_sorts_17913 = math.random(0, 1)
if choix_sorts_17913 == 0 then
pUnit:RegisterEvent('spell0_17913', 1, 1)
end
if choix_sorts_17913 == 1 then
pUnit:RegisterEvent('spell1_17913', 1, 1)
end
end

function mob17913_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17913', math.random(1500, 3000), 1)
end

function mob17913_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17913_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17913_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17913, 1, 'mob17913_Action')
RegisterUnitEvent(17913, 2, 'mob17913_Leave')
RegisterUnitEvent(17913, 3, 'mob17913_Kill')
RegisterUnitEvent(17913, 4, 'mob17913_Die')
